package com.ioday02test;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSTest {
    public static void main(String[] args) throws IOException {
        String[] arr = {"喜欢冒险","喜欢魔法"};
        Student s = new Student("惠惠","12","萌妹子",arr);
        FileOutputStream fos = new FileOutputStream("student.obj");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(s);
        oos.close();

    }
}
